﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

//author : Kha
namespace VietThuongLMS.ViewModels
{
    public class PhanCongViewModel
    {
        public List<PhanCong> List { get; set; }
        public int Total { get; set; }

        public List<PhanCongMoRongModel> ListMoRong { get; set; }
        public int TotalMoRong { get; set; }
        public string TongTienCong { get; set; }

        public PhanCongViewModel()
        {
            this.List = new List<PhanCong>();
            this.ListMoRong = new List<PhanCongMoRongModel>();
            this.Total = 0;
            this.TotalMoRong = 0;
        }

        public PhanCongViewModel(List<PhanCong> list, int total)
        {
            this.List = list;
            this.Total = total;
        }
        public PhanCongViewModel(List<PhanCongMoRongModel> list, int total)
        {
            this.ListMoRong = list;
            this.TotalMoRong = total;
        }
        public void TinhTongTienCong(List<double> danhsachtiencong)
        {
            double sum = 0;
            foreach (double tc in danhsachtiencong)
            {
                sum = sum + tc;
            }
            TongTienCong = sum.ToString();
        }
    }

    //Added by Kha
    public class PhanCongMoRongModel
    {

        public PhanCong Pc { get; set; }

        public string TenGiaoVien { get; set; }

        public string TenLopHoc { get; set; }

        public string TenCaHoc { get; set; }

        public double TienCong { get; set; }

        public PhanCongMoRongModel()
        {
            // TODO: Complete member initialization
            Pc = new PhanCong();
        }
    }
    //End Addition

    /// <summary>
    /// Lop calendar
    /// | Author: NHDuc
    /// | Created Date: 18/12/2013
    /// </summary>
    public class CalendarModel
    {
        public int id { get; set; }
        public string title { get; set; }
        public int malop { get; set; }
        public string start { get; set; }
        public string end { get; set; }
        public string url { get; set; }
        public string thoigianBD { get; set; }
        public string thoigianKT { get; set; }
        public string giaovien { get; set; }
        public string dshocvien { get; set; }
    }
}